package server;

import server.server.Server;
import server.web.HttpServer;
import server.util.mod.ModManager;

public class Main {
    public static volatile Server chatServer = null;

    public static void main(final String[] args){
        ModManager mm = new ModManager("mods");
        int count = mm.loadAll();
        System.out.println("【模组管理器】 " + (count >= 0 ? "已加载" + count + "个模组！" : "未加载模组！"));
        try {
            chatServer = new Server(12123, mm);

            HttpServer hs = new HttpServer(80);
            hs.start("http");
            hs.join();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}